<?php
/**
 * ===============================================
 * 版权所有 2019-2050 青岛铁锤科技有限公司，并保留所有权利。
 * 网站地址: http://www.huaxianling.com
 * ===============================================
 * Author: Happy dong
 * Created Time: 2019-07-03 09:49
 *
 * Version: 2.0
 */

namespace App\Modules\Employee\Validators;


use Flower\Core\Repository\Contracts\ValidatorInterface;
use Flower\Core\Repository\Validator\LaravelValidator;

class PortfolioValidator extends LaravelValidator
{
	protected $rules = [
		ValidatorInterface::RULE_CREATE => [
			'user_id'            => 'required|numeric',
			'name'               => 'alpha_num',
			'service_id'         => 'required|numeric',
		]
	];
	protected $messages = [
		'user_id.required'      => 'user_id不能为空',
		'user_id.numeric'       => 'user_id格式必须为数字',
		'service_id.required'   => '服务id不能为空',
		'service_id.numeric'    => '服务id数据格式必须为数字',
		'name.alpha_num'        => '作品数据格式必须为字母、数字',
	];

}